import fetch from './fetch.js';

const getProductFaqList = params => {
    return fetch({
        url: 'productFaq/list',
        method: 'get',
        params
    });
};

const delProductFaq = params => {
    return fetch({
        url: `productFaq/${params.id}`,
        method: 'delete',
        params: ''
    });
};
const getProductFaq = params => {
    return fetch({
        url: `productFaq/${params.id}`,
        method: 'get',
        params: ''
    });
};

const editProductFaq = data => {
    return fetch({
        url: 'productFaq',
        method: 'put',
        data
    });
};

const addProductFaq = data => {
    return fetch({
        url: 'productFaq',
        method: 'post',
        data
    });
};

const faq = {
    getProductFaqList,
    delProductFaq,
    editProductFaq,
    addProductFaq,
    getProductFaq
};

export default faq;
